<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>

  <script>
    let arr = [5, 3, 55, 2, 33, 4, 1];

    //冒泡排序
    // for (var i = 0; i < arr.length; i++) {
    //   for (var j = 0; j < arr.length; j++) {
    //     if (arr[j] > arr[j + 1]) {
    //       let tem = arr[j];
    //       arr[j] = arr[j + 1];
    //       arr[j + 1] = tem;
    //     }
    //   }
    // }
    // console.log(arr);
    // 选择排序
    for (var i = 0; i < arr.length; i++) {
      for (var j = i + 1; j < arr.length; j++) {
        if (arr[i] > arr[j]) {
          let tem = arr[i];
          arr[i] = arr[j];
          arr[j] = tem;
        }
      }
    }
  
   
 
console.log(arr);
function aa(a,b,c,d,e,g){
    console.log(a,b,c,d,e,g,'abdc');
    console.log(this.name);
}
aa.apply({name:'aa123'},[{name:'zs',age:18},'qwe',1,2,3,])

</script>
</html>
 
  </script>
</html>
